#version 450 core 
in vec3 ourColor; 
in vec4 fragPos;
out vec4 color; 

void main() 
{ 
    vec3 dfdxpos = dFdx(fragPos.xyz);
    vec3 dfdypos = dFdy(fragPos.xyz);
    vec3 normal = normalize(cross(dfdxpos, dfdypos));
    color = vec4(ourColor, 1.0f) *abs(dot(normal, vec3(1.0, 1.0, 1.0)));
}